Skip to content

Submit Fiat-Shamir (Instant verification)#1565

Closed
yrong wants to merge 43 commits intomainfrom
ron/submitFiatShamir-relay
Closed

Submit Fiat-Shamir (Instant verification)#1565
yrong wants to merge 43 commits intomainfrom
ron/submitFiatShamir-relay

Conversation

@yrong
Copy link
Copy Markdown
Contributor

@yrong yrong commented Sep 14, 2025

Context

Introduces an --instant-verification flag for the parachain-v2 relayer, replacing the continuous streaming listener with a poll-and-deliver model.

Instead of always-on BEEFY tracking in the light client, the relayer periodically scans for undelivered messages against the latest BEEFY block on the Relay chain, evaluates fee profitability, triggers an on-demand BEEFY sync (via Fiat-Shamir), and then submits the messages — all in one shot.

This is designed to reduce costs by only syncing BEEFY when there are profitable messages to deliver.

Copy link
Copy Markdown
Contributor

@alistair-singh alistair-singh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we ever relay fiat shamir from the relayers given that it is 3x more expensive? I do not think we need any relayer changes here. Maybe a one shot command, that we could use in a playbook to unstuck the beefy client.

A more important relayer change is to make sure the beefy and on-demand-beefy relayer abandons a ticket if someone has successfully submitted a fiat shamir with a block greater than your tickets block.

@yrong
Copy link
Copy Markdown
Contributor Author

yrong commented Nov 26, 2025

Would we ever relay fiat shamir from the relayers given that it is 3x more expensive? I do not think we need any relayer changes here.

This PR is mainly intended to address a specific use case where the end user is willing to bear the full cost of both the consensus update and the message execution for time-sensitive scenarios (as mentioned by the Hydration team in the channel). In such cases, the message relay will submit the Fiat-Shamir consensus update together with the message update.

Maybe a one shot command, that we could use in a playbook to unstuck the beefy client.

Yes, we add a one shot command for submit Fiat-Shamir in this PR.

A more important relayer change is to make sure the beefy and on-demand-beefy relayer abandons a ticket if someone has successfully submitted a fiat shamir with a block greater than your tickets block.

Yes, we've added this check, as mentioned in https://github.com/Snowfork/snowbridge/pull/1565/files#r2563477732 before commitRandao and submitFinal in the previous two-phase flow.

Base automatically changed from ron/submitFiatShamir to main November 28, 2025 09:30
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.02%. Comparing base (1cf39a2) to head (0efa2b3).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1565   +/-   ##
=======================================
  Coverage   91.02%   91.02%           
=======================================
  Files          19       19           
  Lines         903      903           
  Branches      164      164           
=======================================
  Hits          822      822           
  Misses         64       64           
  Partials       17       17           
Flag Coverage Δ
solidity 91.02% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yrong yrong changed the title Submit Fiat-Shamir (Relay) Instant verification for the parachain relay using Fiat–Shamir Jan 7, 2026
@yrong yrong changed the title Instant verification for the parachain relay using Fiat–Shamir Submit Fiat-Shamir - Instant verification in parachain relay Mar 26, 2026
@yrong yrong changed the title Submit Fiat-Shamir - Instant verification in parachain relay Submit Fiat-Shamir (Instant verification) Mar 27, 2026
@yrong yrong closed this Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants